<template>
	<view style="margin:10px">
		<u-form>
			<u-form-item label="日期:"  border-bottom="false" label-width="150" >
				{{data.time}}
				<!-- <u-input v-model="data.time" disabled="true" pladeholder="" /> -->
			</u-form-item>
			<u-form-item label="事项:"  border-bottom="false" label-width="150" >
				{{data.sx}}
				<!-- <u-input v-model="data.sx" disabled="true" pladeholder=""  /> -->
			</u-form-item>
			<u-form-item label="处理结果:"  border-bottom="false"  label-width="150" >
				{{data.result}}
			</u-form-item>
			<u-form-item label="照片:"  border-bottom="false" label-width="150" >
				<image v-for="(imgPath,index) of ImgList" :key="index" class="photos" :src="imgUrl+imgPath"></image>
			</u-form-item>
			<u-form-item label="签名:"  :border-bottom="border_bottom"  label-width="150" />
			<view class="wrapper" >
				<view class="showimg">
					<image  :src="imgUrl+data.qmPath"></image>
				</view>
			</view>
		</u-form>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				data:{
					id:'',
					time:'',
					sx:'',
					result:'',
					filePaths:'',
					locaiton:'',
					userId:'',
					score:'',
					state:'',
					qmPath:''
				},
				imgUrl:this.$http.config.uploadPath,
				ImgList:[],
				search:{
					id:''
				},
				type:'',
				url:''
			}
		},
		methods:{
			getDetail(){
				if('fwqz' === this.type)
					this.url = "/fwqz/detail";
				this.$http.get(this.url,{params:this.search}).then(res=>{
					let data = res.data.data;
					if(data){
						this.data = data;
						this.ImgList = this.data.filePaths.split(",")
					}
				}).catch(e=>{
					
				})
			}
		},
		onLoad(options) {
			this.search.id = options.id;
			this.type = options.type;
			this.getDetail();
		}
	}
</script>

<style scoped>
	.wrapper {
	  width: 100%;
	  height: 100%;
	  overflow: hidden;
	  display: flex;
	  align-content: center;
	  flex-direction: column;
	  justify-content: center;
	  font-size: 28upx;
	}
	.showimg{
		border: 4upx solid #e9e9e9;
		overflow: hidden;
		width: 90%;
		margin: 0 auto;
		background: #eee;
		height: 350upx;
		align-items: center;
		justify-content: center;
	}
	.showimg>image{
		width: 100%;
		height: 100%;	
	}
	.photos{
		width: 300rpx;
		height: 300rpx;
	}
</style>
